import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 洪汤泽大帅哥
 * Date: 2024-10-10
 * Time: 15:02
 */
//输出一个整数的每一位，如：123的每一位是3，2，1
public class TestDemo {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int tmp = n;
        int count = 0;
        while (tmp > 0) {
            tmp /= 10;
            count++;
        }
        for (int i = 0; i < count; i++) {
            System.out.print(n%10+" ");
            n/=10;
        }
    }
}
